﻿using System;
using Newtonsoft.Json;

namespace Ecobee.Net
{
	public class Error : ApiObject
	{
		private string _name = string.Empty;
		private string _description = string.Empty;
		private string _uri = null;

		/// <summary>
		/// 
		/// </summary>
		[JsonProperty(PropertyName = "error")]
		public string ErrorName
		{
			get
			{
				return _name;
			}
			set
			{
				_name= value;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		[JsonProperty(PropertyName = "error_descripton")]
		public string ErrorDescription
		{
			get
			{
				return _description;
			}
			set
			{
				_description= value;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		[JsonProperty(PropertyName = "error_uri")]
		public string ErrorUri
		{
			get
			{
				return _uri;
			}
			set
			{
				_uri= value;
			}
		}

		/// <summary>
		/// 
		/// </summary>
		[JsonIgnore]
		public Uri Uri
		{
			get
			{
				return new Uri(this.ErrorUri);
			}
		}
	}
}
